Method for geotagging of pictures and apparatus thereof

ABSTRACT

Provided are a method and an apparatus for tagging a photograph with information. The method of tagging a photograph with information, which calculates a shooting position of an input image from reference images having shooting position information to tag the shooting position information, includes: selecting a plurality of reference images; calculating a relative shooting position of the input image to the shooting positions of the reference images; calculating the shooting position of the input image on the basis of the calculation result of the calculating; and storing the shooting position and shooting direction information on the input image in an exchangeable image file format (EXIF) tag of the input image.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Republic of Korea Patent ApplicationNo. 10-2008-0124513, filed on Dec. 9, 2008, and all the benefitsaccruing therefrom under 35 U.S.C. §119(a), the contents of which in itsentirety are herein incorporated by reference.

BACKGROUND

1. Field

This disclosure relates to a method and apparatus for geotagging of aphotograph, and more particularly, to a method and apparatus for tagginga photograph taken with a digital camera without a global positioningsystem (GPS) function or with a general film camera and uploaded on awebsite, with GPS information and a direction in which an object isphotographed, in which two reference images tagged with GPS informationare searched for, relative positions and directions between the imagesand an input image are obtained through image processing, and GPSinformation and direction information on the input image are determinedand tagged by using the GPS information on the reference images.

2. Description of the Related Art

Recently, with the development of Internet technology and digitaldevices, many people upload and share photographs taken by using camerasin Internet photo sharing sites or their blogs. In addition, as mapinformation services have been actively provided in recent years,methods of uploading photos in association with maps have spreadgradually.

At this point, as the Internet service companies allow users to inputinformation associated with shooting position in addition to simpleupload of the photos in the Internet, the companies try to extend a newservice area. The process of inputting position information is calledgeotagging.

By applying the tag information having the position information, travelinformation such as photos taken in advance by other people at realpositions on a map can be obtained. As such, various types ofinformation can be acquired. In addition, as leading Internet servicecompanies provide photo services associated with positions, the interestin geotagging has increased.

In addition, a method of utilizing global positioning system (GPS) datafor geotagging has started to spread, but it is still in the initialstage. In most cases, photos taken by people are manually tagged one byone through a comparison with a map.

As digital cameras are widespread, general users easily take photographsand upload their photos on the Internet blogs and photo sharing sites.When the photos are uploaded on a web album, the photos are arranged intime order, and the information such as a type of camera is displayed.This can be achieved because exchangeable image file format (EXIF) taginformation is automatically stored in a photo header file when aphotograph is taken with the camera.

Recently, cameras cooperative with the GPS as the geotagging method havestarted to spread, and attempts to store position information in theEXIF tag have been made. The GPS camera will additionally use a magneticfield sensor such as a digital compass in order to provide accurateinformation on a position and a viewpoint, that is, a direction of thecamera at the time of taking a photograph.

The applicability of the photograph tagged with the position informationincluding the direction information is great. There are advantages inthat travel information can be directly checked on a map, and3-dimensional (3D) reconstruction of an object from the acquired photoscan be achieved with the position information on the camera. In order toapply these advantages, this kind of service has been competitivelyproposed to the Internet service companies.

However, as described above, since the cameras cooperative with the GPSare not common yet, it is not easy to provide the position and directioninformation to the existing photographs. Accordingly, a technique oftagging the existing photograph that does not include GPS informationwith position and direction information through image processing isrequired.

SUMMARY

The disclosure provides a method and apparatus for automatically taggingan existing photograph which does not include shooting position anddirection information with shooting position information (latitude andlongitude coordinates) and direction information.

In one aspect, there is provided a tagging method including: selecting aplurality of reference images; calculating a relative shooting positionof an input image to the shooting positions of the reference images;calculating the shooting position of the input image on the basis of thecalculation result of the calculating; and storing the shooting positionand shooting direction information on the input image in an exchangeableimage file format (EXIF) tag of the input image.

In another aspect, there is provided a tagging apparatus including: anintrinsic parameter extractor extracting an intrinsic parameter; afeature vector extractor for extracting a feature vector from thefeature points of reference images and an input image; a matrix andvector extractor for extracting the rotation matrix and the translationvector from the intrinsic parameter and the feature vector; a calculatorfor calculating the shooting position and shooting direction of theinput image by using the rotation matrix and the translation vector; anda tagging unit for recording the calculated position and directioninformation in the EXIF tag of the input image.

Accordingly, the information tagging method and apparatus according tothe embodiment can easily input and store shooting position anddirection information in an image which does not store position anddirection tag information, and a user does not need to inputinformation. As a result, photographs can be tagged with the positionand direction information accurately and simply.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features and advantages of the disclosedexemplary embodiments will be more apparent from the following detaileddescription taken in conjunction with the accompanying drawings.

FIG. 1 is a flowchart of the entire system of a method of tagging aphotograph with position and direction information according to anembodiment.

FIG. 2 illustrates a method of finding feature points according to theembodiment.

FIG. 3 illustrates a relative shooting position of an input imageaccording to the embodiment.

FIGS. 4 a and 4 b are views illustrating an operation of estimating anabsolute shooting position of the input image according to theembodiment.

FIG. 5 is a flowchart of a method of tagging a photograph withinformation according to the embodiment.

FIG. 6 is a flowchart of a method of extracting a rotation matrix and atranslation vector according to the embodiment.

FIG. 7 is a flowchart of a method of obtaining the shooting position ofthe input image according to the embodiment.

FIG. 8 is a flowchart of a method of obtaining the shooting direction ofthe input image according to the embodiment.

FIG. 9 is a block diagram of an apparatus for tagging a photo withinformation according to the embodiment.

DETAILED DESCRIPTION

Exemplary embodiments now will be described more fully hereinafter withreference to the accompanying drawings, in which exemplary embodimentsare shown. This disclosure may, however, be embodied in many differentforms and should not be construed as limited to the exemplaryembodiments set forth therein. Rather, these exemplary embodiments areprovided so that this disclosure will be thorough and complete, and willfully convey the scope of this disclosure to those skilled in the art.In the description, details of well-known features and techniques may beomitted to avoid unnecessarily obscuring the presented embodiments.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of this disclosure.As used herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. Furthermore, the use of the terms a, an, etc. does not denotea limitation of quantity, but rather denotes the presence of at leastone of the referenced item. It will be further understood that the terms“comprises” and/or “comprising”, or “includes” and/or “including” whenused in this specification, specify the presence of stated features,regions, integers, steps, operations, elements, and/or components, butdo not preclude the presence or addition of one or more other features,regions, integers, steps, operations, elements, components, and/orgroups thereof.

Unless otherwise defined, all terms (including technical and scientificterms) used herein have the same meaning as commonly understood by oneof ordinary skill in the art. It will be further understood that terms,such as those defined in commonly used dictionaries, should beinterpreted as having a meaning that is consistent with their meaning inthe context of the relevant art and the present disclosure, and will notbe interpreted in an idealized or overly formal sense unless expresslyso defined herein.

In the drawings, like reference numerals in the drawings denote likeelements. The shape, size and regions, and the like, of the drawing maybe exaggerated for clarity.

FIG. 1 is a flowchart of the entire system of a method of tagging aphotograph with position and direction information according to anembodiment. Picture candidates are selected from a server or a databaseof a photo sharing site W including photo data.

In a similarity-based reference image extraction S11, from among thepictures existing in the aforementioned server or the photo database ofthe photo sharing site W, only the pictures having position informationare considered as a target. The picture candidates having the positioninformation are searched for target candidates by inputting adescription keyword representing a position similar to an input image Pof a user. When the keyword information is insufficient, only a visualdescriptor comparison is performed.

By extracting robust visual descriptors from the searched candidatephoto images using an algorithm such as scale-invariant featuretransform (SIFT), visual similarities are compared. Through thesimilarity comparison, the two photo images having the highestsimilarity are selected. Alternatively, the user may manually input twophotographs of the same object. The two input photographs serve asreference images I₁, I₂, and when position information is not stored inan exchangeable image file format (EXIF) tag of the reference image, theuser will have to directly store the position information therein. Sincethe object in the input image P and the object in the reference imagesI₁, I₂ are the same, there is no need to determine similarity.

As such, the method of selecting the reference images I₁, I₂ is notlimited to specific methods, but may be varied depending on ranges orapplications.

Next, a camera intrinsic parameter extraction S12 for the referenceimages I₁, I₂ and the input photo image P is performed. In this processS12, intrinsic parameters of a camera are extracted. From the extractionresult, data such as a focal length converted into a pixel unit of thecamera can be obtained.

In general, extracting an intrinsic parameter from a single photographis not possible. However, in the embodiment, EXIF tag information, whichenables extraction of camera intrinsic parameters from only a singlephotograph, is utilized. Nowadays, any kind of digital camera canautomatically create EXIF tags when taking photos, and from theinformation, a type of the camera and a focal length can be obtained.The intrinsic parameter can be derived from the values.

The intrinsic parameter includes the camera focal length and lensanamorphic degrees. Since the recent camera lenses have littleanamorphic degrees, this can be processed as a value of approximately 0and can be ignored. But, the camera focal length is a very importantfactor. The camera focal length can be obtained from the image acquiredin advance.

From the EXIF tag included in the photo, a resolution of the image, atype of the camera, and the focal length can be obtained. However, thefocal length included in the EXIF tag is not represented as a pixelvalue. Therefore, in order to convert the focal length into the pixelvalue, CCD effective pixel information is needed. For this, by using theinformation on the camera type included in the EXIF tag, a camera focallength of a desired pixel value can be calculated. Consequently, theintrinsic parameter can be extracted from the EXIF tag.

Next, matching S13 of two images as a pair on the basis of the extractedfeature point is performed. By matching each pair of images, matchingpoints therebetween are obtained. By obtaining common matching points ofboth of the reference images I₁, I₂ and the input image P, more accuratematching points can be obtained. However, there is a limitation in thata number of photos having many common areas are needed in order toobtain the points, so that applying this for general use is difficult.

In the embodiment, applied is a method of calculating a rotation matrixand a translation vector which represent a relationship only betweeneach pair of photos, so that common feature points of each pair ofphotos alone are enough for the method. Accordingly, the limitation thata number of common areas of all target photo images are needed can beovercome.

FIG. 2 is a diagram showing the process S13 of obtaining the matchingpoints of FIG. 1. When SIFT is used to extract feature points, a numberof feature points can be extracted from an image. In this case, on thebasis of a position extracted as the feature point, 8×8 pixels areselected, (a center of a left picture is the position of the featurepoint), and gradients of each pixel can be represented as arrows.Thereafter, when a histogram accumulation is performed on the arrows ofeach quadrant of the left picture, a right picture is obtained. Thiscorresponds to a visual descriptor (VD). When a VD of each feature pointis determined, a difference between histograms per each feature point iscalculated, and the feature point having the minimum difference isdetermined as the matching feature point. The matching feature point isused as a component of a feature vector that will be used forcalculating a fundamental matrix and an essential matrix, which will bedescribed later.

Next, referring back to FIG. 1, calculating S14, S15 of the fundamentalmatrix and the essential matrix is performed. The fundamental matrix andthe essential matrix between each reference image I₁, I₂ and the inputimage P are calculated. Through an 8-point algorithm, the fundamentalmatrix that satisfies the following condition can be calculated S14.

x_(i)F_(ip)x_(p)=0   [Equation 1]

where x_(i) and x_(p) are feature vectors extracted from the referenceimage I_(i) and the input image P. Similarly, the relation between thereference image I_(j) and the input image P and the fundamental matrixbetween the reference images I_(i) and I_(j) can also be derived byusing Equation 1.

The essential matrices E_(ip), E_(jp), and E_(ij) are derived S15 fromthe calculated fundamental matrices F_(ip), F_(jp), and F_(ij) throughEquation 2 as follows.

E_(ip)=K_(i)F_(ip)K_(p)   [Equation 2]

where K_(i) and K_(p) are the intrinsic parameters of the camera whichare extracted from the reference image I_(i) and the input image P. Therotation matrix R and the translation vector t between images can becalculated from the derived essential matrices E_(ip), E_(jp), andE_(ij).

Now, the process of calculating the rotation matrix R and thetranslation vector t will be described.

By multiplying the fundamental matrix by the matrices K_(i), K_(p), theessential matrix is calculated. The rotation matrix R and thetranslation vector t can be calculated from the calculated essentialmatrix.

The essential matrix E can be expressed as follows.

E=UΣV^(T)   [Equation 3]

where U and V are 3×3 orthogonal matrices, and Σ is a 3×3 diagonalmatrix.

$\begin{matrix}{\Sigma = \begin{bmatrix}S & 0 & 0 \\0 & S & 0 \\0 & 0 & 0\end{bmatrix}} & \left\lbrack {{Equation}\mspace{14mu} 4} \right\rbrack\end{matrix}$

The determinant of the diagonal matrix Σ becomes a singular value of thematrix E.

$\begin{matrix}{W = \begin{bmatrix}0 & {- 1} & 0 \\1 & 0 & 0 \\0 & 0 & 1\end{bmatrix}} & \left\lbrack {{Equation}\mspace{14mu} 5} \right\rbrack\end{matrix}$

When a matrix W is defined as shown above, the vector t and the matrix Rto be obtained are as follows.

[t]_(x)=VWΣW^(T)   [Equation 6]

R=UW ⁻¹ V ^(T)   [Equation 7]

Here, the matrix [t]_(x) is as follows.

$\begin{matrix}{\lbrack t\rbrack_{x} = \begin{bmatrix}0 & {- a_{3}} & a_{2} \\a_{3} & 0 & {- a_{1}} \\{- a_{2}} & a_{1} & 0\end{bmatrix}} & \left\lbrack {{Equation}\mspace{14mu} 8} \right\rbrack\end{matrix}$

Next, a process S16 of applying triangulation is performed. In thisprocess S16, a point where straight lines intersect in a 3-dimensional(3D) space is calculated from the translation vectors t₁ and t₃ obtainedin the preceding process, thereby calculating a position where the inputphotograph P is shot relative to the reference images. In this case,calculation of the straight lines which are exactly aligned is possibleonly theoretically. Therefore, the calculation is performed by findingthe most practically approximate points using the method of leastsquares.

However, a scale ambiguity problem occurs in the extracted rotationmatrix R and the translation vector t. Since the actual distance of thereference image is known, the problem is solved by performingnormalization with respect to the value.

The shooting position of the input image relative to the referenceimages can be estimated from the extracted rotation matrix R and thetranslation vector t.

FIG. 3 is a view illustrating a process of determining the relativeposition of the process (S16) in FIG. 1. A position of another referenceimage I_(j) is determined by using a rotation matrix R₁ and atranslation vector t₁ with respect to the reference image I_(i) of FIG.3. In addition, a position of the input image P is determined by using arotation matrix R₃ and a translation vector t₃ with respect to thereference image I_(j). As described above, the relative shootingposition of the input image P can be estimated by triangulation.

Next, referring back to FIG. 1, a process S17 of extracting the shootingposition and direction information on the input image is performed. Therelative position can be represented as absolute latitude and longitudefrom the reference images having actual latitude and longitudecoordinate data [global positioning system (GPS) data]. In addition,since the rotation matrix value is calculated, the direction in additionto the position where the picture is taken is calculated. Therefore,without additional apparatuses such as a GPS device or a digitalcompass, the latitude and longitude coordinates and the shootingdirection information of the input image can be extracted.

A method of determining the absolute position and direction is describedas follows. The two reference images include the GPS information.Accordingly, since the relative position of the single input image iscalculated from the two reference images by triangulation, the absolutepositions (the latitude and longitude coordinates) of the referenceimages can be easily calculated by the law of sines.

FIGS. 4 a and 4 b are views illustrating a process (S17) of obtainingthe shooting position and direction of the input image in FIG. 1. Theresult of triangulation is exemplified in FIG. 4 a. Coordinates of areference image 1 form a reference point in a reference coordinatesystem. In addition, a reference direction is formed as an arbitrarydirection on the coordinates of the reference image 1. Since therotation matrix R₁ and the translation vector t₁ of a reference image 2with respect to the reference image 1 are known, the shooting positionand direction can be indicated after the translation by the translationvector t₁ and the rotation by the rotation matrix R₁.

Similarly, the shooting direction of the input image P can be indicatedfrom the rotation matrix R₂ with respect to the reference image 1, and atriangle is formed by the translation of the translation vector t₂. FIG.4 b shows a result of positioning the formed triangle on the real map byscale matching with the GPS coordinates of the reference images. For thealignment with the reference coordinates, the triangle of FIG. 4 a canbe rotated, and when the rotation is needed, the quantity of therotation of the triangle is added to the shooting direction obtainedwith reference to FIG. 4 a to obtain the final shooting direction.

When all the photographs in the candidate area are input through theoperations, the position information is automatically calculated, andthe information can be stored as a metadata of the photograph such as anEXIF tag.

The information can be applied very usefully by position-based services,personal blogs, and photo sharing sites. In addition, without precisiondevices such as GPS sensor, by selecting reference images for thephotographs available in the Internet, the shooting position anddirection information can be automatically obtained. In the case where asoftware engine is included as a plug-in form in existing photo sharingsites, when the user uploads a photograph, information on the actualshooting position and direction can automatically be displayed.

FIG. 5 illustrates a method of tagging a photograph with informationaccording to the embodiment. The information tagging method according tothe embodiment includes: a process S110 of selecting a plurality ofreference images; a process S120 of calculating a relative shootingposition of the input image with respect to the shooting position of thereference images; a process S130 of calculating the shooting position ofthe input image by using the calculation result in the precedingprocess; and a process S140 of storing the shooting position andshooting direction information on the input image in the EXIF tag of theinput image. Here, the input image is in devoid of the shooting positionor the direction information recorded in the EXIF tag.

In the process S110 of selecting the plurality of reference images fromthe database storing photos, as described above, by using the SIFT andthe like, an image having a high similarity can be selected from astorage device storing a number of images such as Internet sharingservers or databases and user's computer storage devices.

In the process S120 of calculating the relative shooting position of theinput image to the shooting position of the reference image, by usingthe rotation matrix and the translation vector between the referenceimage and the input image and the GPS coordinates of the referenceimage, the relative position and direction can be calculated. Since theinput image does not include GPS coordinate information, in order toobtain the shooting position and direction of the input image, therelative position and direction to the reference image have to beobtained.

FIG. 6 is a flow chart illustrating the process S120 of calculating therelative shooting position of the input image to the shooting positionof the reference image in FIG. 5. The relative position and directioncan be obtained by calculating S1240 the rotation matrix and thetranslation vector. The rotation matrix and the translation vector canbe derived from the fundamental matrix and the essential matrix. First,intrinsic parameters of a camera are extracted S1210. From the intrinsicparameters, the fundamental matrix and the essential matrix can bederived. The fundamental matrix can be calculated S1220 by using thefeature vector as in Equation 1. When the fundamental matrix is obtainedusing Equation 1, the essential matrix can be calculated S1230 usingEquation 2.

When the rotation matrix and the translation vector between the imagesare calculated S1240 through the processes described above, the relativeposition and direction to the reference image can be acquired.

Referring back to FIG. 5, in the process S130 of calculating theshooting position and direction of the input image using the calculationresult in the preceding process, the latitude and longitude coordinatesand the shooting direction on the real map are calculated. Since therotation matrix R and the translation vector t are obtained in advance,the position on the real map can be derived by obtaining the coordinatesof the two reference images and the input image in the coordinatesystem.

FIG. 7 is a flow chart illustrating the process of calculating theshooting position of the input image of the process S130 in FIG. 5.First, the reference image I_(i) is designated S1310 as a referencepoint in the coordinate system. Using the rotation matrix R₁ and thetranslation vector t₁ between the I_(i) and the I_(j), a reference pointis rotated and translated S1320. Next, forming S1330 triangle with thereference point and the rotated and translated points and obtainingS1340 position on the real map by transforming the triangle, theshooting position of the reference image I_(j) can be obtained. Inaddition, in the same way, by using the rotation matrix R₂ and thetranslation vector t₂ between the I_(i) and the input image P, theshooting position of the input image P can be obtained.

FIG. 8 is a flow chart illustrating the process of calculating theshooting direction of the input image of the process S130 in FIG. 5.First, the reference image I_(i) is designated S1311 as a referencepoint in the coordinate system and an arbitrary direction of thereference image I_(i) is designated S1321 as a reference direction.Next, by using the rotation matrix and the translation vector, thereference direction is rotated S1331. In this way, the direction of eachimage with respect to the reference direction can be obtained S1341.

Referring back to FIG. 5, in the process S140 of storing the shootingposition and direction information on the input image in the EXIF tag ofthe input image, the direction information is stored in an undefinedarea or an unused area of the EXIF tags of the reference image and theinput image, and the GPS information is stored in a GPS information areaof the EXIF tag of the input image.

FIG. 9 shows an apparatus 100 for tagging a photograph with information.The information tagging apparatus according to the embodiment includes:an intrinsic parameter extractor 110 for extracting the intrinsicparameter; a feature vector extractor 120 for extracting a featurevector from the feature points of the reference images and the inputimage; a matrix and vector extractor 130 for extracting the rotationmatrix and the translation vector from the intrinsic parameter and thefeature vector; a calculator 140 for calculating the shooting positionand direction of the input image by using the rotation matrix and thetranslation vector; and a tagging unit 150 for recording the positionand direction information in the EXIF tag of the input image. Inaddition, a reference image selector for selecting two reference imagesby extracting visual descriptors from the database or the photo sharingserver on the basis of similarities may further be included.

The intrinsic parameter can be extracted by using the focal lengthstored in the EXIF tag of the photograph and the CCD effective pixelnumber of a camera. The feature vector can be calculated by obtainingthe feature point through the operation of finding matching featurepoints. The operation and function of the information tagging apparatusaccording to the embodiment are the same as the information taggingmethod described above.

Through repeated processes, the shooting position and direction may bestored in the EXIF tag of the photo devoid of shooting position anddirection data. As a result, the information may be tagged in all thephotographs requiring the position and direction tagging information.

While the exemplary embodiments have been shown and described, it willbe understood by those skilled in the art that various changes in formand details may be made thereto without departing from the spirit andscope of this disclosure as defined by the appended claims.

In addition, many modifications can be made to adapt a particularsituation or material to the teachings of this disclosure withoutdeparting from the essential scope thereof. Therefore, it is intendedthat this disclosure not be limited to the particular exemplaryembodiments disclosed as the best mode contemplated for carrying outthis disclosure, but that this disclosure will include all embodimentsfalling within the scope of the appended claims.

1. A method of tagging a photograph with information, which calculates ashooting position of an input image from reference images havingshooting position information to tag the shooting position information,the method comprising: selecting a plurality of reference images;calculating a relative shooting position of the input image to theshooting positions of the reference images; calculating the shootingposition of the input image on the basis of the calculation result ofthe calculation; and storing the shooting position and shootingdirection information on the input image in an exchangeable image fileformat (EXIF) tag of the input image.
 2. The method according to claim1, wherein in the selecting of the reference images, a plurality of thereference images are selected from a database storing photographs, andthe two images are selected by extracting a visual descriptor of eachimage on the basis of similarities.
 3. The method according to claim 1,wherein the input image is in a state where the EXIF tag of the inputimage does not include the shooting position and shooting directioninformation.
 4. The method according to claim 1, wherein the calculatingof the relative shooting position of the input image comprises:calculating rotation matrices and translation vectors between thereference images and the input image; designating a shooting positionamong the reference images as a reference point in a referencecoordinate system; rotating and translating the reference point by usingthe rotation matrices and the translation vectors; and forming atriangle by using the rotated two points and the reference point, andwherein the rotation matrices and the translation vectors are a rotationmatrix and a translation vector between the reference image that servesas the reference point and the input image and a rotation matrix and atranslation vector between the reference images.
 5. The method accordingto claim 4, wherein the calculating of the rotation matrices and thetranslation vectors comprises: extracting the feature vector of eachimage by obtaining the feature points between the selected referenceimages and the input image; and extracting the rotation matrices and thetranslation vectors by using the feature vectors.
 6. The methodaccording to claim 5, wherein the feature vector between the images isobtained by selecting a plurality of areas having predetermined sizesfrom each image, extracting visual descriptors from the plurality ofareas, and comparing differences between histograms of the areas.
 7. Themethod according to claim 4, wherein the calculating of the relativeshooting position of the input image further includes obtaining therelative shooting direction of the input image from the referencecoordinate system, wherein the obtaining of the relative shootingdirection of the input image includes: designating one shooting positionamong the reference images as a reference point in a coordinate system;designating a reference direction at the reference point; rotating andtranslating the reference point by using the rotation matrices and thetranslation vectors; and obtaining directions of two points rotated withrespect to the reference direction, wherein the rotation matrices are arotation matrix between the reference image that serves as the referencepoint and the input image, and a rotation matrix between the referenceimages, and wherein the direction of the point rotated and translated bythe rotation vector and the translation vector between the referenceimage that serves as the reference point and the input image is theshooting direction of the input image.
 8. The method according to claim4, wherein in the calculating of the shooting position of the inputimage, the shooting position of the input image is calculated byobtaining a position of the point rotated and translated by transformingthe triangle on the real map.
 9. The method according to claim 7,wherein the calculating of the shooting position of the input imagefurther includes calculating the shooting direction of the input image,and wherein in the calculating of the shooting direction of the inputimage, the shooting direction of the input image is calculated byobtaining the direction rotated by transforming the triangle on the realmap.
 10. The method according to claim 1, wherein in the selecting ofthe reference images, images having the same shooting positioninformation are selected, and wherein the input image is input to adatabase storing photographs, and the position information is tagged onthe input image stored in the database on the basis of the referenceimages.
 11. An apparatus of tagging a photograph with information, whichcalculates a shooting position and shooting direction of an input imagefrom reference images having position information and tagging thephotograph with the shooting position and the shooting directioninformation, the apparatus comprising: an intrinsic parameter extractorextracting an intrinsic parameter; a feature vector extractor forextracting a feature vector from the feature points of the referenceimage and the input image; a matrix and vector extractor for extractingthe rotation matrix and the translation vector from the intrinsicparameter and the feature vector; a calculator for calculating theshooting position and shooting direction of the input image by using therotation matrix and the translation vector; and a tagging unit forrecording the calculated position and direction information in the EXIFtag of the input image.
 12. The apparatus according to claim 11, whereinthe intrinsic parameter extractor extracts an intrinsic parameterrepresenting a focal length included in the EXIF tag of the referenceimage and the input image as a pixel value of a camera.
 13. Theapparatus according to claim 11, wherein the feature vector extractorobtains a feature point between the images by selecting a plurality ofareas having predetermined sizes from each image, extracting visualdescriptors from the plurality of areas, and comparing differencesbetween histograms of the areas, and extracting the feature vector ofeach image from the feature points.
 14. The apparatus according to claim11, wherein the matrix and vector extractor includes: a fundamentalmatrix extraction module extracting a fundamental matrix by using thefeature vectors; an essential matrix extraction module extracting anessential matrix by using the fundamental matrix and the intrinsicparameter; and a rotation matrix and translation vector extractionmodule extracting a rotation matrix and a translation vector from thefundamental matrix and the essential matrix.
 15. The apparatus accordingto claim 11, wherein the calculator designates one among the referenceimages as a reference point, rotates and translates the reference pointby using the rotation matrix and the translation vector, and forms atriangle with the rotated and translated two points and the referencepoint, thereby calculating the shooting position of the input image onthe real map.
 16. The apparatus according to claim 11, wherein thecalculator designates one among the reference images as a referencepoint, designating a reference direction at the reference point, andcalculating the shooting direction of the input image by rotating thereference direction using the rotation matrix.
 17. The apparatusaccording to claim 11, further comprising a reference image selectorselecting two reference images by extracting visual descriptors from adatabase storing photographs on the basis of similarities.